home *** CD-ROM | disk | FTP | other *** search
-
- >>
- >> #define FD_CLR(fd, set) do { \
- >> u_int __i; \
- >> for (__i = 0; __i < ((fd_set FAR *)(set))->fd_count ; __i++) { \
- >> if (((fd_set FAR *)(set))->fd_array[__i] == fd) { \
- >> while (__i < ((fd_set FAR *)(set))->fd_count-1) { \
- >> ((fd_set FAR *)(set))->fd_array[__i] = \
- >> ((fd_set FAR *)(set))->fd_array[__i+1]; \
- >> __i++; \
- >> } \
- >> ((fd_set FAR *)(set))->fd_count--; \
- >> break; \
- >> } \
- >> } \
- >> } while(0)
- >>
- >> #define FD_SET(fd, set) do { \
- >> if (((fd_set FAR *)(set))->fd_count < FD_SETSIZE) \
- >> ((fd_set FAR *)(set))->fd_array[((fd_set FAR *)(set))->fd_count++]=fd;\
- >> } while(0)
- >>
-
- These macros are far to complex for the poor old compilers we MS-Windows
- types use.
-
- I quiver at the thought of having to debug macro's like this in a segmented
- CPU environment.
-
- KISS.
-
-
- Larry Backman
- FTP Software
-
-